package exercises.Charpter9;

interface Rodent1 {
	void bite();
}

class Mouse1 implements Rodent1{
	@Override
	public void bite(){
		System.out.println("Mouse bite");
	}
}

class Gerbil1 implements Rodent1{
	@Override
	public void bite(){
		System.out.println("Gerbil bite");
	}
}

class Hamster1 implements Rodent1{
	@Override
	public void bite(){
		System.out.println("Hamster bite");
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}

public class Seven {
	public static void main(String[] args){
		Rodent1[] rodents = {
				new Mouse1(),
				new Gerbil1(),
				new Hamster1(),
		};
		for(Rodent1 t:rodents){
			t.bite();
		}
	}
}
